home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeed.internetmci.com!panix!cmcl2!news!schonberg!dewar
- From: dewar@cs.nyu.edu (Robert Dewar)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ knocks the crap out of Ada
- Date: 29 Feb 1996 19:35:29 -0500
- Organization: Courant Institute of Mathematical Sciences
- Message-ID: <dewar.825640041@schonberg>
- References: <JSA.96Feb16135027@organon.com> <4gaa6l$8mk@post.gsfc.nasa.gov> <4gd94r$isu@mack.rt66.com> <1996Feb22.005518.13396@leeweyr.sccsi.com> <4gvrffINNlqo@anvil.ugrad.cs.ubc.ca> <4h4j31$1ga3@watnews1.watson.ibm.com>
- NNTP-Posting-Host: schonberg.cs.nyu.edu
- X-Newsreader: NN version 6.5.0 (NOV)
-
- "|> And it should certainly not be written in some poorly standardized language,
- |> for which no two implementations are in agreement. C is governed by an
- |> ISO standard, which, if adhered to, lets a strictly conforming program
- |> translated by a strictly conforming implementation yield well-defined results
- .
- |>
- |> I don't think you can say the same for Ada or C++."
-
- (a) this reveals quite a lack of knowledge of Ada, which had a standard
- *before* anyone started using it, and to which all compilers conformed
- faithfully.
-
- (b) C is actually not in such good shape here, although the ANSI standard
- has been out for quite a while, the compliance with this standard is stlil
- by no means universal. For example, just a few months ago, I wrote soe
- code using the standard which used the returned value from sprintf. It
- worked fine on OS/2, but bombed on SunOS, whose C compiler library does
- something non-standard. OK, this sort of thing happens, but it was the
- response of our local "C expert" that I found interesting, I was told
- "everyone knows that you should not use the returned value of sprintf
- if you are writing portable code". Of course the situation gets better
- here with time, and finally the ANSI C standard is starting to have some
- force.
-
- (c) C is much less hostile to extensions than Ada (to validate Ada you have
- to sign a declaration that you have not implemented any extensions). What
- this means in practice is that you have to be more careful in C not to
- wander off into these extensions
-
- There are many fronts to argue this general point on, but I am afraid you
- have, through not knowing Ada well, wandered into an area where Ada has
- very definitely got the upper hand (C++ is of course another matter entirely :-)
-
-